package com.bwhx.eruler.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.bwhx.eruler.bean.Page;
import com.bwhx.eruler.bean.Project;
import com.bwhx.eruler.dao.ProjectDAO;

@Repository
public class ProjectDAOImpl extends BaseDaoImpl<Project> implements ProjectDAO {
	
	public ProjectDAOImpl() {
		this.setNs("com.bwhx.eruler.mapper.ProjectMapper.");
	}


	@Override
	public List<Project> list(Page p) {
		return getSqlSession().selectList(this.getNs() + "list", p);

	}

	@Override
	public Integer count(Project project) {
		return getSqlSession().selectOne(this.getNs() + "count", project);
	}


	@Override
	public void save(Project project) {
		getSqlSession().insert(this.getNs() + "save", project);
		
	}


	@Override
	public List<Project> findByPcode(Project project) {
		return getSqlSession().selectList(this.getNs() + "findByPcode", project);
	}


	@Override
	public Project findprojectByPcodeadPpwd(Project project) {
		return getSqlSession().selectOne(this.getNs() + "findprojectByPcodeadPpwd", project);
	}



}
